package org.ehe.erp.domain.quality.dto;

import lombok.Data;
import org.ehe.erp.domain.quality.vo.ErpQualityAttachmentVo;
import org.ehe.erp.domain.quality.vo.ErpQualityFeedbackVo;
import org.ehe.erp.domain.quality.vo.ErpQualityTaskBatchVo;
import org.ehe.erp.domain.quality.vo.ErpQualityTaskVo;

import java.io.Serial;
import java.io.Serializable;
import java.util.List;

/**
 * 质检异常反馈详情响应对象
 *
 * @author zhangnn
 * @className QualityFeedbackDetailResponse
 * @description 包含反馈信息、相关任务信息、批次追溯、附件信息的完整响应
 * @date 2025-09-10 15:00:00
 */
@Data
public class QualityFeedbackDetailResponse implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /** 反馈基本信息 */
    private ErpQualityFeedbackVo feedbackInfo;

    /** 关联的质检任务信息 */
    private ErpQualityTaskVo taskInfo;

    /** 相关物料批次信息（用于批次追溯） */
    private List<ErpQualityTaskBatchVo> relatedBatches;

    /** 附件信息列表 */
    private List<ErpQualityAttachmentVo> attachments;

    /** 疑似问题物料信息 */
    private MaterialInfo suspectedMaterial;

    /** 疑似问题供应商信息 */
    private SupplierInfo suspectedSupplier;

    /**
     * 物料信息内部类
     */
    @Data
    public static class MaterialInfo implements Serializable {

        @Serial
        private static final long serialVersionUID = 1L;

        private Long materialId;
        private String materialCode;
        private String materialName;
    }

    /**
     * 供应商信息内部类
     */
    @Data
    public static class SupplierInfo implements Serializable {

        @Serial
        private static final long serialVersionUID = 1L;

        private Long supplierId;
        private String supplierCode;
        private String supplierName;
    }
}
